//=============================================================================
// PB Inventory class
//=============================================================================
class PB extends KFWeapon;

#exec OBJ LOAD FILE=..\sounds\pb_S.uax
#exec OBJ LOAD FILE=..\Textures\pb_T.utx

function bool HandlePickupQuery( pickup Item )
{
	if ( Item.InventoryType == Class )
	{
		/*if ( KFHumanPawn(Owner) != none && !KFHumanPawn(Owner).CanCarry(Class'DualPB'.Default.Weight) )
		{
			PlayerController(Instigator.Controller).ReceiveLocalizedMessage(Class'KFMainMessages', 2);
			return true;
		}*/

		if ( KFPlayerController(Instigator.Controller) != none )
		{
			KFPlayerController(Instigator.Controller).PendingAmmo = WeaponPickup(Item).AmmoAmount[0];
		}

		return false; // Allow to "pickup" so this weapon can be replaced with dual deagle.
	}

	return Super.HandlePickupQuery(Item);
}

function float GetAIRating()
{
	local Bot B;


	B = Bot(Instigator.Controller);
	if ( (B == None) || (B.Enemy == None) )
		return AIRating;

	return (AIRating + 0.0003 * FClamp(1500 - VSize(B.Enemy.Location - Instigator.Location),0,1000));
}

function byte BestMode()
{
    return 0;
}

simulated function bool PutDown()
{
	if ( Instigator.PendingWeapon.class == class'DualPB' )
	{
		bIsReloading = false;
	}

	return super(KFWeapon).PutDown();
}

defaultproperties
{
     MagCapacity=8
     ReloadRate=2.200000
     ReloadAnim="Reload"
     ReloadAnimRate=1.000000
     FlashBoneName="tip"
     WeaponReloadAnim="Reload_Single9mm"
     HudImage=Texture'pb_T.PB_unselected'
     SelectedHudImage=Texture'pb_T.PB'
     Weight=4.000000
     bHasAimingMode=True
     IdleAimAnim="Idle_Iron"
     StandardDisplayFOV=60.000000
     bModeZeroCanDryFire=True
     SleeveNum=1
     TraderInfoTexture=Texture'pb_T.Trader_PB'
     bIsTier2Weapon=True
     ZoomedDisplayFOV=50.000000
     FireModeClass(0)=Class'UnitedMut_v54.PBFire'
     FireModeClass(1)=Class'KFMod.NoFire'
     PutDownAnim="PutDown"
     SelectSound=Sound'pb_S.pb_draw'
     AIRating=0.450000
     CurrentRating=0.450000
     bShowChargingBar=True
     EffectOffset=(X=100.000000,Y=25.000000,Z=-10.000000)
     DisplayFOV=65.000000
     Priority=100
     InventoryGroup=2
     GroupOffset=3
     PickupClass=Class'UnitedMut_v54.PBPickup'
     PlayerViewOffset=(X=30.000000,Y=20.000000,Z=-10.000000)
     BobDamping=6.000000
     AttachmentClass=Class'UnitedMut_v54.PBAttachment'
     IconCoords=(X1=250,Y1=110,X2=330,Y2=145)
     ItemName="PB"
     bUseDynamicLights=True
     Mesh=SkeletalMesh'PbpistolDT_A.Pb_pistol'
     Skins(0)=Combiner'pb_T.pb_cmb'
     Skins(1)=Combiner'KF_Weapons_Trip_T.hands.hands_1stP_military_cmb'
     TransientSoundVolume=1.000000
}
